@AbapCatalog.viewEnhancementCategory: [#NONE]
@AccessControl.authorizationCheck: #NOT_REQUIRED  //定义了DCL才检查，不定义不检查
@EndUserText.label: 'new cds entity'
@Metadata.ignorePropagatedAnnotations: true //不继承其它CDS的Annotation
@ObjectModel.usageType: {
  serviceQuality: #X,            //和性能有关
  sizeCategory: #S,
  dataClass: #MIXED              //透明表or配置表
}
define view entity ZROC_CDS_NEW
  with parameters
    p_travelid  :/dmo/travel_id
//    @Environment.systemField: #SYSTEM_TIME
//    p_createdby :syuname

  as select from /dmo/travel  as a
    join         /dmo/booking as b on a.travel_id = b.travel_id
{
  key a.travel_id              as TravelId,
      b.booking_id             as BookingId,
      a.agency_id              as AgencyId,
      a.customer_id            as CustomerId,
      a.begin_date             as BeginDate,
      a.end_date               as EndDate,
      @Semantics.amount.currencyCode: 'CurrencyCode'
      a.booking_fee            as BookingFee,
      @Semantics.amount.currencyCode: 'CurrencyCode'
      a.total_price            as TotalPrice,
      a.currency_code          as CurrencyCode,
      a.description            as Description,
      a.status                 as Status,
      a.createdby              as Createdby,
      a.createdat              as Createdat,
      a.lastchangedby          as Lastchangedby,
      a.lastchangedat          as Lastchangedat,

      'Test'                   as Test,
      $session.client          as zclient,
      $session.system_date     as system_date,
      $session.system_language as system_language,
      $session.user            as zuser,
      $session.user_date       as user_date,
      $session.user_timezone   as user_timezone

}
where
      a.travel_id = $parameters.p_travelid
//  and a.createdby = $parameters.p_createdby
